import 'package:flutter/material.dart';

import '../../service/network/network_listener.dart';



class NetworkSetting extends StatefulWidget {
  const NetworkSetting({super.key});

  @override
  State<NetworkSetting> createState() => _NetworkSettingState();
}

class _NetworkSettingState extends State<NetworkSetting> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("空页面")),
      body: NetWorkListener(
        // builder: (ctx) => const Center(child: Text("内容视图")),
        builder: (ctx) => Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Center(child: Text("内容视图",style: TextStyle(fontSize: 24),)),
            ElevatedButton(
              onPressed: (){
                setState(() {

                });
              },
              child: Text("重新加载")
            ),
          ],
        ),
      ),
    );
  }
}